import javax.swing.*;

public class SimpleJFrame extends JFrame{
	int winx = 200,winy = 100,screenx = 1400,screeny = 900;
	int posx = screenx/2-winx/2,posy = screeny/2-winy/2;
	public SimpleJFrame(){
		super("SimpleJFrame");
		ImageIcon icon_load = new ImageIcon("icon_load.png");
		ImageIcon icon_save = new ImageIcon("icon_save.png");
		JButton load = new JButton("Load",icon_load);
		JButton save = new JButton("Save",icon_save);
		
		JLabel name = new JLabel("Name:",SwingConstants.LEFT);
		JLabel password = new JLabel("Password:",SwingConstants.LEFT);

		int textWidth = 10;
		JTextField nameText = new JTextField(textWidth);
		
		int passwordWidth = 10;
		JPasswordField passText = new JPasswordField(textWidth);
		passText.setEchoChar('*');

		JTextArea commit  = new JTextArea(3,4);
		commit.setLineWrap(true);
		commit.setWrapStyleWord(true);

		JScrollPane scroll = new JScrollPane(commit,
			ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);

		JPanel panel = new JPanel();
		panel.add(load);
		panel.add(save);
		panel.add(name);
		panel.add(nameText);
		panel.add(password);
		panel.add(passText);
		panel.add(commit);
		panel.add(scroll);
		setContentPane(panel);
		add(panel);
		
		setBounds(posx,posy,winx,winy);
		setVisible(true);
		pack();
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
	}

	public static void main(String[] args) {
		SimpleJFrame aJFrame = new SimpleJFrame();
	}
}